package com.ywl.exercise.service.impl;


import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Propagation;

import com.ywl.exercise.dao.UserDao;
import com.ywl.exercise.entity.UserEntity;
import com.ywl.exercise.service.UserService;


@Service
@Transactional(propagation = Propagation.REQUIRED)
@TransactionConfiguration(transactionManager = "txManager", defaultRollback = true)
public class UserServiceImpl implements UserService {
	@Resource
	private UserDao userDaoImpl; 

	@Override
	public void saveUser(UserEntity entity) {
		userDaoImpl.saveUser(entity);
	}
	
	@Override
	public void updateUser(UserEntity entity) {
		userDaoImpl.updateUser(entity);
	}

	
	@Override
	public UserEntity findUserByLoginId(String loginid) {
		return userDaoImpl.findUserByLoginId(loginid);
	}
}
